package common

import (
	"fmt"
	"os"
)

var (
	verboseEnabled bool = false
)

func EnableVerbose() {
	verboseEnabled = true
}

func PrintError(format string, values ...interface{}) {
	fmt.Fprintf(os.Stderr, format, values...)
	fmt.Fprintln(os.Stderr)
}

func PrintInfo(format string, values ...interface{}) {
	fmt.Fprintf(os.Stdout, format, values...)
	fmt.Fprintln(os.Stdout)
}

func PrintVerbose(format string, values ...interface{}) {
	if !verboseEnabled {
		return
	}

	fmt.Fprintf(os.Stdout, format, values...)
	fmt.Fprintln(os.Stdout)
}
